package e_stream;

import java.io.File;

import javax.swing.filechooser.FileFilter;


class MyFilter extends FileFilter 
{
    String  type;
    String  desc; // 확장자 지정
    public  MyFilter(String  type,  String  desc)
    {
        this.type  =  "."+type;
        this.desc  =  desc;
    }
    public  boolean  accept(File  f)
    {
        return  f.getName().endsWith(type)  ||  f.isDirectory();
    }
    
    public  String  getDescription()
    {
        return  desc;
    }
    
    public String getType(){
    	return type;
    }
    
    
}
